home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_origdemo_connector.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  115 lines

  1. # Jones 3D Cog Script
  2. #
  3. # demo_connector.cog
  4. #
  5. # [DS & revised by HB]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ==============================================================================
  10.  
  11. symbols
  12.  
  13.     message     entered
  14.     
  15.     keyframe    in_hatpush=0in_figithat_4_4.key        local
  16.     # keyframe    in_think=0in_thinking_4_4.key        local
  17.     keyframe    in_sideTOhips=0in_stand1_bd_4.key    local
  18.     keyframe    in_handsONhips=0in_stand4.key        local
  19.     keyframe    in_botharmsup=0in_armsup_1_1.key    local
  20.  
  21.     sound        in_names=jp01j01a.wav                local # Sophia? Turner? 2.5s
  22.     sound        in_where=jp01j02.wav                local # Where is everybody? 2.7s
  23.     sound        music0=mus_jep_intro.wav            local
  24.  
  25.     sector        sec_trigger
  26.  
  27.     thing        jeep_start_actor                    nolink # This is now a mark (was startplayer in full level)
  28.     thing        player                                local
  29.     thing        indyactor                            nolink
  30.     thing        campos_lo                            nolink
  31.     thing        campos_hi                            nolink
  32.     thing        camtarg                                nolink
  33.     
  34.     material    topMat=jeep_top.mat                    local
  35.     material    botMat=jeep_bbmp.mat                local
  36.  
  37.     int         in_keytrack1                        local
  38.     int            in_keytrack2                        local
  39.     int         cursound                            local
  40.  
  41.     int            bSeen=0                                local
  42.  
  43. end
  44.  
  45. # ==============================================================================
  46.  
  47. code
  48.  
  49. entered:
  50.     if (GetSenderRef() != sec_trigger) return;
  51.  
  52.     if (bSeen) return; # RT
  53.     bSeen = 1;
  54.  
  55.     player = GetLocalPlayerThing();
  56.     TeleportThing(player, jeep_start_actor);
  57.     SetThingFlags(jeep_start_actor, 0x80000);
  58.     SetThingFlags(player, 0x80000);
  59.     SetActorFlags(player, 0x200000);
  60.  
  61. #   switch camera first
  62.     SetCameraLookInterp(2, 0);
  63.     SetCameraPosInterp(2, 0);
  64.     SetCameraFocus(2, campos_lo);
  65.     SetCameraSecondaryFocus(2, camtarg);
  66.     SetCurrentCamera(2);
  67.  
  68.     # RT: Set up jeep materials
  69.     SetMaterialCel(topMat, 2);
  70.     SetMaterialCel(botMat, 2);
  71.     
  72.     AttachThingToThing(camtarg, indyactor);
  73.     StartCutscene(2);
  74.     ClearThingFlags(indyactor, 0x80000);
  75.     CopyPlayerHolsters(player, indyactor);
  76.     PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  77.  
  78.     #   let engine generate frame
  79.     Sleep(0.01);
  80.  
  81.     AISetMoveSpeed(indyactor, 1.0);
  82.     AISetMoveThing(indyactor, jeep_start_actor, 0);
  83.     SetCameraPosInterp(2, 1);
  84.     SetCAmeraInterpSpeed(2, 4.5);
  85.     Sleep(0.01);
  86.     SetCameraFocus(2, campos_hi);
  87.     AIWaitForStop(indyactor);
  88.     cursound=PlayVoice(indyactor, in_names, 1.0, 0);
  89.     Sleep(1.0);
  90.     in_keyTrack1 = PlayKey(indyactor, in_handsONhips, 2, 0x0, 0);
  91.     PlayKey(indyactor, in_sideTOhips, 4, 0x12, 1);
  92.     in_keyTrack2 = PlayKey(indyactor, in_hatpush, 4, 0x12, 0);
  93.     Sleep(1.5);
  94.     StopKey(indyactor, in_keyTrack1, 0.5);
  95.     StopKey(indyactor, in_keyTrack2, 0.5);
  96.     Sleep(0.5);
  97.     WaitForSound(cursound);
  98.     PlayVoice(indyactor, in_where, 1.0, 0);
  99.     PlayKey(indyactor, in_botharmsup, 4, 0x12, 1);
  100.     ResetCameraFOV(0, 0.0);
  101.     SetCameraLookInterp(2, 0);
  102.     SetCameraPosInterp(2, 0);
  103.     SetThingFlags(indyactor, 0x80000);
  104.     ClearThingFlags(player, 0x80000);
  105.     SetThingAlpha(player, 1.0);
  106.     SetCameraPosition(1, GetThingPos(campos_hi));
  107.     SetCurrentCamera(1);
  108.     EndCutscene();
  109.     ClearActorFlags(player, 0x200000);
  110.     
  111.     return;
  112.  
  113. end
  114.  
  115.